// 发料价格调整
import axios from '@/api/fetch';
import SERVER from '@/api/server';

export const queryBusinessCustomer = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/businessCustomer`, { params });

export const addBusinessCustomer = params => axios.post(`${SERVER.DMSCLOUD_PART}/basedata/businessCustomer/add`, params);

export const updateBusinessCustomer = params => axios.put(`${SERVER.DMSCLOUD_PART}/basedata/businessCustomer/modifyByCustomerCode`, params);

// export const dealersSelect = params => axios.get(`/dmscloud.part/basedata/businessCustomer/searchDealers`, { params });

export const customersSelect = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/businessCustomer/customersdict`, { params });

// 获取首页信息
export const getPartCostAdjustDatas = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/priceAdjust/queryRoRepairPart`, { params });
export const getPartPriceAdjust = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/partPrice`, { params });

// 首页提交备件金额修改
export const updateOrderPartPrice = params => axios.post(`${SERVER.DMSCLOUD_PART}/basedata/priceAdjust/updatePricePart`, params);

export const updatePartPriceAdjust = params => axios.put(`${SERVER.DMSCLOUD_PART}/basedata/partPrice/aa/${params.PART_NO}/${params.STORAGE_CODE}/PART_BATCH_NO`, params);

export const changePrice = params => axios.post(`${SERVER.DMSCLOUD_PART}/basedata/priceAdjust/updatePricePart`, params);

// 订单号查询
export const getWorkOrderlist = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/priceAdjust`, { params });

// 查询所有员工
export const getDealerUser = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getDealerUser`);
// 获取全部维修类型
export const getAllReparType = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedataRepairtypes/findAllRepairType`);
// 主列表查询接口
export const queryMainTableList = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/partPrice/queryPartSalesPrice`, { params });
// 批量修改
export const batchUpdatePrice = params => axios.post(`${SERVER.DMSCLOUD_PART}/basedata/partPrice`, params);
// 全量修改接口
export const allUpdatePrice = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/partPrice/update`, { params });
